package com.sxj.corejava.code12_jdbc;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 石小俊
 * @date 2024年07月02日 10:45
 */
public class Dept {
    private Integer id;
    private String name;
    private String remark;
    private List<Emp> emps;

    public void addEmp(Emp emp){
        emps.add(emp);
    }

    @Override
    public String toString() {
        return "Dept{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", remark='" + remark + '\'' +
                ", emps=" + emps +
                '}';
    }

    public List<Emp> getEmps() {
        return emps;
    }

    public void setEmps(List<Emp> emps) {
        this.emps = emps;
    }

    public Dept(String name, String remark) {
        this.name = name;
        this.remark = remark;
    }

    public Dept() {
        emps = new ArrayList<>();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
